<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once 'database.php';
$username=$_POST['username'];
$password=$_POST['password'];
$nama=$_POST['nama'];

$query=database::query("INSERT INTO user (username,password,nama) VALUES ('$username','$password','$nama')");

 if(!$query){
         die('Error :    ' .mysql_error());

    }else{
        if(!mkdir("repositories/".$_POST['username'], 0, true)){}
        header("Location:login.php");
    }
?>
